﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Common.Infrastructure
{
    [AttributeUsage(AttributeTargets.Class, Inherited = true)]
    public class ModelModelApiAttribute : Attribute
    {
        private readonly string api = null;
        
        /// <summary>
        /// 
        /// </summary>
        /// <param name="api">ID字段名称</param> 
        public ModelModelApiAttribute(string api)
        {
            if (string.IsNullOrEmpty(api))
            {
                throw new Exception("api is null");
            }

            this.api = api;
        }
        
        /// <summary>
         /// 模块
         /// </summary>  
        public string Api
        {
            get { return api; }
        }
    }
}
